package ABBB;

public class Nei implements Neicun {
    private String leixing;
    private int rong;

    public Nei(String leixing, int rong) {
        this.leixing = leixing;
        this.rong = rong;
    }

    public String getLeixing() {
        return leixing;
    }

    public void setLeixing(String leixing) {
        this.leixing = leixing;
    }

    public int getRong() {
        return rong;
    }

    public void setRong(int rong) {
        this.rong = rong;
    }

    @Override
    public void work() {
        System.out.println("这个类型是：" + leixing + "容量是：" + rong);
    }

    @Override
    public void jieru() {
        System.out.println("插上" + rong + "的内存");
    }

    @Override
    public void bachu() {
        System.out.println("移除" + rong + "的内存");
    }
    public String toString() {
        return"这个类型是："+leixing+"容量是："+rong;
    }
}
